package cn.edu.dao;

import cn.edu.pojo.Person;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

/**
 * @author wans
 * @create 2022-09-29 18:08
 */
public interface PersonMapper {
    Person findPersonById(Integer id);
    @Select("select * from tb_person where id = #{id}")
    @Results({
            @Result(column = "card_id",property = "card",
                one=@One(select = "cn.edu.dao.IdCardMapper.selectIdCardById")),
            })
    Person selectPersonById(Integer id);
}
